package pa4.interfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

public interface SystemManager<V> extends Remote{
	
	public final String SERVICENAME = "pa4.SystemManager";
	public final int NR_REPLICAS = 3;

	public ArrayList<Peer<V>> getRegisteredPeers(Peer<V> peer) throws RemoteException;
	public void join(Peer<V> peer) throws RemoteException;
	public Node<V> getRoot() throws RemoteException;
	
	public Node<V> replicateNode(int id, boolean isLeaf, Peer<V> peer) throws RemoteException;
	
	public void put(int key, V value) throws RemoteException;
	
	public V get(int key) throws RemoteException;
	
	public void remove(int key) throws RemoteException;

}
